import requests


# html下载器
class HtmlDownloader:
    def download(self, url):
        """
        根据给定的url下载网页
        :param url: url
        :return: 下载好的文本
        """
        result = requests.get(url)
        return result.content.decode("utf-8")

# 以下是测试代码，可忽略
# downloader = HtmlDownloader()
# result = downloader.download("http://127.0.0.1:8848/xiaomi-master/index.html")
# print(result)